import {Service, action} from "adajs";

class CommentService extends Service {
	defaultData() {
		return {
			content: "",
			popuped: false
		};
	}

	onupdate(current, data) {
		Object.assign(current, data);
	}

	@action("setPopuped")
	setPopuped(current, state) {
		current.popuped = state;
	}

	@action("setContent")
	setContent(current, content) {
		current.content = content;
	}
}

export default CommentService;